<?php
require_once 'pages/TMSItemPage.inc';

/**
 * @author dkrasilnikov@gmail.com
 */
class TMSCollectionItemPage extends TMSItemPage {
/**
 * @var TCandyModel
 */	
	protected $_ioc_container_model_;
	
	public $FilterProperty;
	
	private $_path_;
		
	public function __get($nm){
		switch ($nm){
			case 'Path':{
				if (!isset($this->_path_))
					$this->_path_ = $this->service->CollectionPath($this->listPath(),$this->request->container);
				return $this->_path_;
			}break;
			case 'ListUrl':return $this->service->Url($this->listPath(),null,null,array('container'=>$this->request->container));break;
			default:return parent::__get($nm);break;
		}
	}
	
	
	protected function processUrlParameters(array $parameters){
		if ($this->request instanceof THttpRequest)
			$parameters['container'] = $this->request->container;
		return parent::processUrlParameters($parameters);
	}
}
